diff options
| author | secondl1ght <[email protected]> | 2022-08-01 22:04:05 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-08-01 22:04:05 -0600 |
| commit | d073ca91893f3ff1cf3662085bc4dddb2feb184c (patch) | |
| tree | e309a383265201f033c1be7961c45fc8f763ff47 /src/routes/[username] | |
| parent | b8a74370541d396246b3a13fe72e6f528ef1a2ea (diff) | |
| parent | 5428fdf82a4260fa4f5e0bcdb722d6716740d8bf (diff) | |
| download | coinos-ui-d073ca91893f3ff1cf3662085bc4dddb2feb184c.tar.gz coinos-ui-d073ca91893f3ff1cf3662085bc4dddb2feb184c.zip | |
Merge branch 'master' of github.com:coinos/coinos-ui-v2
Diffstat (limited to 'src/routes/[username]')
| -rw-r--r-- | src/routes/[username]/index.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/routes/[username]/index.js b/src/routes/[username]/index.js index 01613574..5229cc50 100644 --- a/src/routes/[username]/index.js +++ b/src/routes/[username]/index.js @@ -1,3 +1,14 @@ +import { get } from '$lib/utils'; + export async function GET({ params }) { - return { body: params }; + let { username } = params; + let body; + + try { + body = await get(`/users/${username}`); + } catch(e) { + body = {}; + } + + return { body }; } |
